package com.huilian.iotbox.admin.wap.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 少凡
 * @date 2020/2/29 10:36
 */
@Mapper
public interface RolePermissionDao {

    Integer authorize(@Param("roleId") Integer roleId, @Param("permissionId") Integer permissionId);

    Integer deleteByPermissionId(@Param("permissionId") Integer permissionId);

    List<Integer> findPermissionIdListByRoleId(Integer roleId);

    void batchUpdate(@Param("list")List<Integer> list, @Param("roleId") Integer roleId, @Param("select") boolean select);

    void batchInsert(@Param("list") List<Integer> list, @Param("roleId") Integer roleId, @Param("select") boolean select);
}
